<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看元素的集合尺寸</title>
    <style>
        div {
            padding: 100px;
            width: 100px;
            height: 100px;
            background: #000;
        }
    </style>
</head>
<body>
    <div></div>
</body>
<script>
    // getBoundingClientRect
    // 返回非实时
    var div = document.getElementsByTagName('div')[0];
    var div_info = div.getBoundingClientRect();
</script>
</html>
